const Sequelize = require('sequelize');
module.exports = function(sequelize, DataTypes) {
  return sequelize.define('zhou_shan_initiator', {
    id: {
      autoIncrement: true,
      type: DataTypes.INTEGER,
      allowNull: false,
      primaryKey: true,
      comment: "自增id"
    },
    Initiator_id: {
      type: DataTypes.INTEGER,
      allowNull: false,
      comment: "sip 发起地的id"
    },
    Initiator_name: {
      type: DataTypes.STRING(255),
      allowNull: true,
      comment: "sip 发起地的名字"
    },
    channel: {
      type: DataTypes.STRING(255),
      allowNull: true,
      comment: "频道"
    },
    ip_gateway: {
      type: DataTypes.STRING(255),
      allowNull: true,
      comment: "网关"
    },
    port: {
      type: DataTypes.STRING(255),
      allowNull: true,
      comment: "端口"
    }
  }, {
    sequelize,
    tableName: 'zhou_shan_initiator',
    timestamps: false,
    indexes: [
      {
        name: "PRIMARY",
        unique: true,
        using: "BTREE",
        fields: [
          { name: "id" },
        ]
      },
    ]
  });
};
